<table class="table table-striped table-bordered table-hover">

    <tr>
    <th width="100" height="40">A&ccedil;&otilde;es</th>
    <th>Nome</th>
    <th width="300">Localização Principal</th>
    </tr>

    <?php

    $res = sql("SELECT * FROM local WHERE status='0' ORDER BY loc_id");

    while($linha = mysql_fetch_array($res)) {

    ?>

    <tr>

    <td height="40">
      
      <input name="excluir[]" type="checkbox" value="<?=$linha['loc_id'];?>"/>
     
    </td>
    <td><?=$linha['loc_nome'];?></td>
    <td>
      <?php
       $res1 = sql("SELECT loc_nome FROM local WHERE status='1' AND loc_id='{$linha['loc_id2']}' ORDER BY loc_id");
       $linha1 = mysql_fetch_array($res1);
       echo $linha1['loc_nome'];
      ?>
    </td>
    </tr>

    <?
    } 
    ?>
</table>